#include<iostream>
#include<vector>
using namespace std;
int n = 10;
vector <int>arr(n,0); 
int main()
{
    int a = arr.front();
    int i = 0;
    for(i = 0;i < n;i++)
    {
        arr[i] = i;
    }
    //cout << a << endl;
    arr[5] = 10;
    //cout << arr[5] << endl;
    //cin >> arr[9];
    //cout << arr[9] << endl;
    arr.pop_back();//删除最后的成员元素
    arr.push_back(65);//在尾部添加数据
    int sz = arr.size();
    int x = arr.empty();//判断动态数组是否已经开辟了空间
    arr.clear();
    if(x)
    {
        cout << "fin" << endl;
    }
    x = arr.empty();
    arr.resize(50,32);
    //cout << sizeof(arr) <<endl;
    vector<int> :: iterator p = arr.end();
    auto p1 = arr.begin();
    //arr.erase(arr.begin(),arr.end());
    for(auto j : arr)//auto智能指针可以自动识别指针类型并在for语句中进行递增。
        cout << j <<" ";
    
    return 0;
}
